<?php 
require_once '../includes/funciones.php';
conexion();
include ("seguridad.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title><?php titulopanel();?></title>
<link rel="STYLESHEET" type="text/css" href="estilo.css"> 
<script type="text/javascript" src="../plugins/jquery.js"></script>
<script type="text/javascript" src="../plugins/jquery_validate/jquery.validate.js"></script>
<script>
  $(document).ready(function(){
		
	$("#userForm").validate({
		rules: {			
			ubicacion: {
				required: true				
			}                        
		},
		messages: {
			ubicacion:{
                                required: "Seleccione una Ubicacion"
                        }			
		}
	});	
  });
</script>

<script type="text/javascript">
        $(document).ready(function(){
           setTimeout(function(){ $(".mensajes").fadeOut(1600);}, 1600);
        });
</script>
</head>
<body>
<div id="contenedor">
 	<div id="encabezado"><?php include('header.php') ?></div><!--fin de encabezado-->
	<div id="menuizquierda"><?php include('menu.php') ?></div>	<!--fin de menuizquierda-->
	<div id="content">
	

<?php
if(isset($_SESSION["borrarpublicidad"]))
{
if($_SESSION["borrarpublicidad"] == "borrado"){
echo '<div class="exitoa mensajes">La publicidad ha sido Borrada Exitosamente </div>';
}
$_SESSION["borrarpublicidad"]=" ";
}
?>
<br/>
<span class="title" style="margin-left:35px;">
	Eliminar Publicidad
	</span>	
            <div id="formulario">
                <br/>
<form class="admin" id="userForm" action="control_publicidad.php" method="POST" class="jqtransform">
<fieldset style="width:480px" class="admin">
<legend>Publicidad</legend>
<p><span>Ubicacion</span>
<select name="ubicacion" id="ubicacion">
<option value="">Seleccione la ubicacion</option>
<option value="1-650-100">Publicidad 1</option>
<option value="2-650-100">Publicidad 2</option>
<option value="3-320-140">Publicidad 3</option>
<option value="4-320-140">Publicidad 4</option>
<option value="5-320-140">Publicidad 5</option>
<option value="6-320-140">Publicidad 6</option>
<option value="7-320-140">Publicidad 7</option>
<option value="8-320-140">Publicidad 8</option>
<option value="9-320-140">Publicidad 9</option>
<option value="10-320-140">Publicidad 10</option>
<option value="11-320-140">Publicidad 11</option>
<option value="12-320-140">Publicidad 12</option>
<option value="13-320-140">Publicidad 13</option>
<option value="14-320-140">Publicidad 14</option>
<option value="15-320-140">Publicidad 15</option>
<option value="16-320-140">Publicidad 16</option>
<option value="17-320-140">Publicidad 17</option>
<option value="18-650-100">Publicidad 18</option>
</select>
</p>

<input name="accion" id="accion" type="hidden" value="2" />

</fieldset>
<br/>
<input class="buttonadmin" type="submit" name="cargar" id="cargar" value="Aceptar"/>
<a class="enlacecancelar" href="publicidades.php"><input type="button" class="buttoncancelar" value="Cancelar"></a>
</form>        

<br/><br/><br/>
<div id="headsubcontent2">Publicidades
</div> <!-- end headsubcontent-->
<br>
		<div id="tablepublicidad">
<table width="400" cellspacing="0" cellpadding="0" align="center">
          <tr>
    <td height="30">1 - 650 x 100
        <?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='1'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="250px"  height="25px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="250px"  height="25px" src="../images_advertisement/generic.png"';
}
?>
    </td>
    <td width="150" height="25">3 - 320 x 140
          <?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='3'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?>
    </td>
  </tr>
                    
                    
                    
                    
                    
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">4 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='4'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">5 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='5'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td height="30">2 - 650 x 100 <?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='2'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="250px"  height="25px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="250px"  height="25px" src="../images_advertisement/generic.png"';
}
?></td>
      
    <td width="150" height="25">6 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='6'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">7 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='7'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">8 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='8'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">9 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='9'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">10 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='10'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">11 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='11'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">12 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='12'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">13 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='13'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">14 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='14'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">15 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='15'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">16 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='16'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td width="150" height="25">17 - 320 x 140<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='17'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="120px"  height="20px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="120px"  height="20px" src="../images_advertisement/generic.png"';
}
?></td>
  </tr>
  <tr>
    <td> 18 - 650 x 100<?php
$conpub = mysql_query("SELECT * FROM `advertisement` where id='18'");
if(mysql_num_rows($conpub)!=0){
while($publicidad = mysql_fetch_array($conpub)){
echo '<img width="250px"  height="25px" src="../'.$publicidad[folder].$publicidad[url].'"';
}
}else{
echo '<img width="250px"  height="25px" src="../images_advertisement/generic.png"';
}
?></td>
    <td width="150" height="25"></td>
  </tr>
                </table>
<br/>
</div>

		
</div><!-- fin subcontent2 -->
			
</div><!--fin de content-->

<div id="piepagina"></div>	<!--fin de piepagina-->

</div>	<!--fin de contenedor-->
</body>
</html>

